The invention relates generally to object-oriented data processing and system management, and more particularly to accessing configuration information from a datastore.
Many executable software programs or applications require access to system-wide, configuration-type information at times when the application is being installed or modified on a computer system, i.e., at configuration time and at the time the application is executed to perform its intended function, i.e., at run time. Typically, the application needs to access configuration information related to available resources on the local computer system and through connected computers across a computer network. These resources include available software and hardware tools as well as available services offered by the system that improve the functionality of the program within the overall system.
Accessing this information is done through direct access to the xe2x80x9cregistryxe2x80x9d located on each computer system. The registry is simply a place to store and read configuration information. Meanwhile, a management system also provides services through embedded logic in response to the configuration data requests. The services may relate to such items as security, validation, roles, etc. as well as network communication conflict management.
The services are typically exploited through an attribute-based programming scheme which allows program developers to specify the services and resources required by an application by setting properties (or xe2x80x9cattributesxe2x80x9d) of each application or component rather than implementing or calling those services directly from the implementation code. Attributes include a particular set of configuration information that is made available to various callers in an attribute-based environment.
Even in an attribute-based programming environment, the application desiring data and services must know where the information comes from in the system. Moreover, the program typically must know the format that the information is stored in to be able to access the information. In existing approaches, the system registry has been used to store configuration data for a particular machine. However, in existing approaches, a programmer was required to access and manipulate registry information directly, introducing undesirable program complexity and exposing the registry to corruption by improper programming. Moreover, the distribution of configuration information among multiple datastores (i.e., in addition to the registry) and data formats is not accommodated by existing approaches. This is particularly true if the location and format of data is expected to evolve over time. In current approaches, the implementation code itself must be altered in order to handle location and format changes to configuration information. Accordingly, existing approaches lack location and format independence that can provide the desired flexibility for storage and access to configuration information in a computer system.
It is with respect to these and other considerations that the present invention has been made.
The present invention relates to a data table object which is a component based object that provides configuration information to a caller in response to a datastore-independent request for information. The present invention also relates to an implementation that exposes a standard interface for callers desiring to access the data as part of an overall catalog management system or schema. The data table interface is substantially separate from the program code related to the catalog schema to thus enable the creation and addition of new data table objects to a catalog system with out recompiling the entire catalog management system program code.
In accordance with preferred aspects of the present invention, a data table object is created that provides access for a caller to configuration data wherein the data table is a COM object that accesses data from a predetermined datastore and provides a common interface enabling the caller to access the data. Datastore interaction code in the data table object enables interaction with the datastore and a cache which is populated by the datastore interaction code with information from the datastore, preferably a table of configuration data referred to a data level table. Following creation of the data table object, the caller gains a pointer to a requested interface. The interface, since the data table is a COM object, provides methods to the caller that allow the caller to read the data in the cache and provide desired data modifications. The caller operates on the cache information, not the datastore information directly.
In accordance with preferred aspects, the present invention relates to a method of presenting configuration information stored in a datastore to a computer process caller within a computer system having memory. The method comprises the steps of populating the memory with configuration information in response to a request from the caller; providing the caller with a cursor to the configuration information located in the memory; and providing a standardized command set for the caller to enable the caller to the obtain configuration information values from the memory. Preferably, the configuration information is presented in to the caller in tabular form, which may require some conversion.
In accordance with other preferred aspects there are several interfaces providing various methods including: Populate Cache, Update Store, Update Read Cache, Restart Row, Get Next Row, Move To Row By Identity, Move to Row by Index, Move to New Row, Delete Row, Set Row, Set Column, Get Column, and Clone Cursor.
The data table object is instantiated by a table dispenser and provides the caller the ability to populate a read cache with a catalog table using Populate Cache. The caller gains access to the populated read cache through a cursor that enables the user to navigate the table using the following methods: Restart Row, Get Next Row, Move To Row By Identity, Move to Row by Index and Move to New Row. The data table object also enables the user to update the catalog table using a write cache and the methods Update Store, Update Read Cache and modify the catalog table using Delete Row, Set Row, Set Column, Get Column. Additionally, the data table preferably supports multiple cursors through the method Clone Cursor.